<?php
include("../inc/Function.php");
if($_SESSION['a']['alevel']!=5 && $power['yfhjl']!=1){
	echo "<script>alert('权限不足');window.location.href='index.php';</script>";exit;
}
$psize = 20;
$page = isset($_GET['page'])?$_GET['page']:1;
$uname = isset($_GET['uname'])?$_GET['uname']:"";
$year = isset($_GET['year'])?$_GET['year']:0;
$month = isset($_GET['month'])?$_GET['month']:0;
$list = monthlist($page,$psize,$uname,$year,$month);
$num = monthlistnum($uname,$year,$month);
if($list){
    $msg = 1;
}else{
    $msg = 0;
}
$page1 = page1($num,$psize,$page,$_SERVER['PHP_SELF']."?uname=$uname&year=$year&month=$month");
$tpl->assign('page',$page1);
$tpl->assign('msg',$msg);
$tpl->assign('uname',$uname);
$tpl->assign('year',$year);
$tpl->assign('month',$month);
$tpl->assign('clist',$list);
$tpl->show('monthlist');
?>